All Questions
3 questions
2votes
0answers
266views
How to handle Gutenberg wp.data async errors?
When using wp.data.select('core').getEntityRecords(...), there is a special selector for loading states wp.data.select('core/data').isResolving(...). But what about actual errors -- backend validation ...
0votes
1answer
1kviews
Update block once an API request returns with a value
I've got a block that allows the user to enter a script when in edit mode, then sends this script to a REST endpoint which returns a WP_Post representing a media file which is then displayed to the ...
1vote
1answer
3kviews
Get post from custom REST endpoint in Gutenberg
I'd like to get a post object from a custom REST endpoint within a Gutenberg block. The REST endpoint returns as part of its JSON payload an array with a "post" key which contains the contents of the ...